import request from '@/utils/request'

export default {
  //发送短信
  sendCode(email) {
    return request({
      url: `/api/users/sendCode`,
      method: `post`,
      data: {
        email: email
      },
      headers: {
        'Content-Type': 'application/json'
      }
    })
  },
  //登录的方法
  loginUser(form) {
    return request({
      url: `/api/users/login`,
      method: `post`,
      data: form
    })
  },
  loginEmailUser(form) {
    return request({
      url: `/api/users/emailLogin`,
      method: `post`,
      data: form
    })
  }
}
